package com.xiaochen.autohttpinvoker;

import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;

public class HttpInvokerScanner extends ClassPathScanningCandidateComponentProvider {
    public HttpInvokerScanner(boolean useDefaultFilters){
        super(useDefaultFilters);
    }
    @Override
    protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
        return beanDefinition.getMetadata().isInterface() && beanDefinition.getMetadata().isIndependent();
    }
}
